package com.igeek.boot_4_druid.mapper;

import com.igeek.boot_4_druid.entity.User;
import java.util.List;

import com.igeek.boot_4_druid.entity.UserExample;
import org.apache.ibatis.annotations.*;

@Mapper
public interface UserMapper {
    @Delete("delete from user where id=#{id}")
    public boolean deleteByPrimaryKey(Integer id);
    @Insert("insert into user (name,age) values (#{name},#{age} );")
    public boolean insert(User user);
    @Select("select * from user where name like '%${name}%'")
    public List<User> selectAll(String name);
    @Update("update user set pic =#{pic}   where id=#{id} ;")
    public boolean updateByPrimaryKey(User user);
    List<User> selectByExample(UserExample example);
}